"""gma URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URL conf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""

from django.conf.urls import url

from apps.guild import views

urlpatterns = [
    # 公会: 首页
    url(r'^$', views.index, name='home'),

    # 公会: 登录
    url(r'^login/(?P<mobile>\d+)/(?P<sms_code>\d+)/$', views.login, name='login'),
    # 公会: 登出
    url(r'^logout/$', views.logout, name='logout'),
    # 公会: 获取验证码
    url(r'^smscode/$', views.fetch_smscode, name='smscode'),

    # 公会: 每日统计
    url(r'^stat/daily/$', views.daily_stat, name='daily_stat'),
    # 公会: 每周统计
    url(r'^stat/weekly/$', views.weekly_stat, name='weekly_stat'),
    # 公会: 每月统计
    url(r'^stat/monthly/$', views.monthly_stat, name='monthly_stat'),

    # 公会: 用户列表
    url(r'^stat/user/(?P<begin>.+)/(?P<end>.+)/$', views.user_stat, name='user_stat'),

    # 公会: 成员列表
    url(r'^members/$', views.members, name='members'),
    # 公会: 主播数据详情
    url(r'^member/(?P<uid>\d+)/$', views.caster_detail, name='caster_detail'),

    # 公会: 预览图片
    url(r'^gallery/(?P<image>.*)/$', views.gallery, name='gallery'),

    # 公会: 收益统计
    url(r'^member/(?P<uid>\d+)/videos/$', views.caster_video_list, name='caster_video_list'),
    # 公会: 个人相册
    url(r'^member/(?P<uid>\d+)/album/$', views.caster_album, name='caster_album'),
    # 公会: 查看视频
    url(r'^video/(?P<vid>\d+)/$', views.view_video, name='view_video'),
]
